package cn.touna.jss.common.properties.disconf;

import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;
import org.springframework.stereotype.Component;

/**
 * <P>描述</P>
 * User: tianhuaxing
 * Date: 2017/8/1
 * Time: 16:15
 */
@Component
//@ConfigurationProperties(prefix = "geo")
//@PropertySource("classpath:properties/geo.properties")
@DisconfFile(targetDirPath = "disconf", filename = "geo.properties")
public class GeoProperties {

//    private String loginUrl = "http://yz.geotmt.com/civp/getview/api/o/login";
    private String loginUrl = "http://yz.geotmtai.com/civp/getview/api/o/login";


//    http://yz.geotmtai.com/civp/getview/api/u/queryUnify

//    private String queryUnifyUrl = "http://yz.geotmt.com/civp/getview/api/u/queryUnify";
    private String queryUnifyUrl = " http://yz.geotmtai.com/civp/getview/api/u/queryUnify";

    private String server; // http://yz.geotmt.com 80、https://yz.geotmt.com 443

    private String path;//调用地址

    private String encryptionType; // AES(秘钥长度不固定)、AES2(秘钥长度16)、DES(秘钥长度8)、DESede(秘钥长度24)、XOR(秘钥只能是数字)

    private String encryptionKey; // 加密类型和加密秘钥向GEO索取(如果是获取数据的时候传的是RSA那么这里自己定义即可)

    private String username; // 账户向GEO申请开通

    private String password; // GEO提供

    private String uno; // GEO提供

    private String etype; // RSA 或 ""

    private String httpConnectTimeout;

    private String httpReadTimeout;

    private String encrypted;// 是否加密传输  1是0否

    private String dsign;//是否进行数字签名 1是0否

    @DisconfFileItem(name = "geo.server", associateField = "server")
    public String getServer() {
        return server;
    }

    public void setServer(String server) {
        this.server = server;
    }

    @DisconfFileItem(name = "geo.path", associateField = "path")
    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @DisconfFileItem(name = "geo.encryptionType", associateField = "encryptionType")
    public String getEncryptionType() {
        return encryptionType;
    }

    public void setEncryptionType(String encryptionType) {
        this.encryptionType = encryptionType;
    }

    @DisconfFileItem(name = "geo.encryptionKey", associateField = "encryptionKey")
    public String getEncryptionKey() {
        return encryptionKey;
    }

    public void setEncryptionKey(String encryptionKey) {
        this.encryptionKey = encryptionKey;
    }

    @DisconfFileItem(name = "geo.username", associateField = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @DisconfFileItem(name = "geo.password", associateField = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @DisconfFileItem(name = "geo.uno", associateField = "uno")
    public String getUno() {
        return uno;
    }

    public void setUno(String uno) {
        this.uno = uno;
    }

    @DisconfFileItem(name = "geo.etype", associateField = "etype")
    public String getEtype() {
        return etype;
    }

    public void setEtype(String etype) {
        this.etype = etype;
    }

    @DisconfFileItem(name = "geo.httpConnectTimeout", associateField = "httpConnectTimeout")
    public String getHttpConnectTimeout() {
        return httpConnectTimeout;
    }

    public void setHttpConnectTimeout(String httpConnectTimeout) {
        this.httpConnectTimeout = httpConnectTimeout;
    }

    @DisconfFileItem(name = "geo.httpReadTimeout", associateField = "httpReadTimeout")
    public String getHttpReadTimeout() {
        return httpReadTimeout;
    }

    public void setHttpReadTimeout(String httpReadTimeout) {
        this.httpReadTimeout = httpReadTimeout;
    }

    @DisconfFileItem(name = "geo.encrypted", associateField = "encrypted")
    public String getEncrypted() {
        return encrypted;
    }

    public void setEncrypted(String encrypted) {
        this.encrypted = encrypted;
    }

    @DisconfFileItem(name = "geo.dsign", associateField = "dsign")
    public String getDsign() {
        return dsign;
    }

    public void setDsign(String dsign) {
        this.dsign = dsign;
    }

    @DisconfFileItem(name = "geo.loginUrl", associateField = "loginUrl")
    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    @DisconfFileItem(name = "geo.queryUnifyUrl", associateField = "queryUnifyUrl")
    public String getQueryUnifyUrl() {
        return queryUnifyUrl;
    }

    public void setQueryUnifyUrl(String queryUnifyUrl) {
        this.queryUnifyUrl = queryUnifyUrl;
    }
}
